package app.sevenc.lib_compiler.utils;

import java.util.Collection;
import java.util.Map;

/**
 * 字节码插桩技术工具类
 *
 * @author Seven-C
 * @date 2021/8/19
 */
public final class ProcessorUtils {

    public static boolean isEmpty(final CharSequence s) {
        return s == null || s.length() == 0;
    }

    public static boolean isEmpty(final Map<?,?> map) {
        return map == null || map.isEmpty();
    }

    public static boolean isEmpty(final Collection<?> coll) {
        return coll == null || coll.isEmpty();
    }

    public static boolean isNotEmpty(final CharSequence s) {return !isEmpty(s); }

    public static boolean isNotEmpty(final Map<?,?> map) {
        return !isEmpty(map);
    }

    public static boolean isNotEmpty(final Collection<?> coll) {
        return !isEmpty(coll);
    }
}
